<?php SQLFile::start() ?>SELECT `org_id`, exam.`exam_id`, `duration`, exam.`start_time`, `end_time`, `name`FROM `exam` LEFT JOIN `exam_session` ON exam.exam_id = exam_session.exam_idWHERE org_id = :org_idAND (:time_now BETWEEN exam.start_time AND end_time)AND ( ( exam_session.exam_session_id IS NULL) OR ( exam_session.closed = 0)  )<?php return SQLFile::end();